<?php
/**
 * Created by PhpStorm.
 * User: dust2
 * Date: 14-12-21
 * Time: 上午12:14
 */
class AddressTableSeeder extends Seeder
{
    public function run()
    {
        DB::table('addresses')->delete();

        Address::insert([
            'name' => 'dust1',
            'third_level' => 503, //北京朝阳区
            'location' => '鸟巢',
            'phone' => '12345678900',
            'postcode' => '100020',
            'user_id' => 1,
            'created_at' => date('Y-m-d'),
            'updated_at' => date('Y-m-d')
        ]);

        Address::insert([
            'name' => 'admin',
            'third_level' => 3377, //香港油尖旺区
            'location' => 'xxx',
            'phone' => '12345678901',
            'postcode' => '999077',
            'user_id' => 1,
            'created_at' => date('Y-m-d'),
            'updated_at' => date('Y-m-d')
        ]);

        Address::insert([
            'name' => 'dust3',
            'third_level' => 3384, //台湾台北
            'location' => '中天娱乐',
            'phone' => '12345678902',
            'postcode' => '222',
            'user_id' => 2,
            'created_at' => date('Y-m-d'),
            'updated_at' => date('Y-m-d')
        ]);

        Address::insert([
            'name' => 'dust4',
            'third_level' => 693, //广州天河区
            'location' => '中山大道西55',
            'phone' => '12345678902',
            'postcode' => '510631',
            'user_id' => 2,
            'created_at' => date('Y-m-d'),
            'updated_at' => date('Y-m-d')
        ]);
    }
}
